/*
 * @Description:
 * @Author: shilinzhou
 * @Date: 2023-12-27 13:33:40
 * @LastEditors: shilinzhou
 * @LastEditTime: 2024-02-01 13:50:28
 */
import { thWordLength4, widthLevel1, widthLevel2 } from '@/config';

import type { BaseTableConfig } from '@/components/base-ui/base-table/type';

export const tableConfig: BaseTableConfig = {
    items: [
        {
            modelKey: 'level',
            columnProps: {
                label: 'BOM层级',
                width: widthLevel2
            }
        },
        {
            modelKey: 'parentMaterialCode',
            columnProps: {
                label: '父项物料编码',
                width: widthLevel2
            }
        },
        {
            modelKey: 'parentMaterialName',
            columnProps: {
                label: '父项物料名称',
                width: widthLevel2
            }
        },
        {
            modelKey: 'materialCode',
            columnProps: {
                label: '子项物料编码',
                width: widthLevel2
            }
        },
        {
            modelKey: 'materialName',
            columnProps: {
                label: '子项物料名称',
                width: widthLevel2
            }
        },
        {
            modelKey: 'materialSpecification',
            columnProps: {
                label: '规格型号 ',
                width: widthLevel2
            }
        },
        {
            modelKey: 'productionType',
            columnProps: {
                label: '生产类型',
                width: thWordLength4
            }
        },
        {
            modelKey: 'unit',
            columnProps: {
                label: '单位',
                width: thWordLength4
            }
        },
        {
            modelKey: 'unitUsage',
            columnProps: {
                label: '单件用量',
                width: thWordLength4
            },
            elInputNumberProps: {
                min: 0,
                max: 9999999999.99,
                precision: 2
            }
        },
        {
            modelKey: 'remarks',
            columnProps: {
                label: '备注',
                width: widthLevel1
            }
        }
    ],
    tableProps: {
        defaultExpandAll: true
    },
    unAction: true,
    unIndex: true,
    unSelection: true
};
